﻿<UserControl x:Class="SupremacyEditor.EditorControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:cal="http://www.codeplex.com/CompositeWPF"
             xmlns:apribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
             xmlns:apdocking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
             xmlns:local="clr-namespace:SupremacyEditor"
             SnapsToDevicePixels="True">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <apribbon:Ribbon x:Name="Ribbon"
                         Grid.Row="0"
                         cal:RegionManager.RegionName="{x:Static local:RegionNames.Ribbon}"
                         ApplicationButtonImageSource="/SupremacyEditor3;component/Resources/Component.png">
            <apribbon:Ribbon.QuickAccessToolBarItems>
                <apribbon:Button Command="{x:Static local:EditorCommands.SaveItem}"
                                 CommandTarget="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:Shell}}}"
                                 Label="Save"
                                 ImageSourceSmall="/SupremacyEditor3;component/Resources/Save16.png"
                                 ImageSourceLarge="/SupremacyEditor3;component/Resources/Save32.png" />
            </apribbon:Ribbon.QuickAccessToolBarItems>
            <apribbon:Tab Label="Home"
                          cal:RegionManager.RegionName="{x:Static local:RegionNames.HomeTab}">
                <apribbon:Group Label="Clipboard">
                    <apribbon:Button ImageSourceSmall="/SupremacyEditor3;component/Resources/Paste16.png"
                                     Label="Paste"
                                     ImageSourceLarge="/SupremacyEditor3;component/Resources/Paste32.png"
                                     Command="{x:Static ApplicationCommands.Paste}" />
                    <apribbon:StackPanel ItemVariantBehavior="MediumThenSmallWhenSmall">
                        <apribbon:Button ImageSourceSmall="/SupremacyEditor3;component/Resources/Cut16.png"
                                         Label="Cut"
                                         Command="{x:Static local:EditorCommands.EditText}" />
                        <apribbon:Button ImageSourceSmall="/SupremacyEditor3;component/Resources/Copy16.png"
                                         Label="Copy"
                                         Command="{x:Static ApplicationCommands.Copy}" />
                        <apribbon:Button ImageSourceSmall="/SupremacyEditor3;component/Resources/Delete16.png"
                                         Label="Delete"
                                         Command="{x:Static local:EditorCommands.DeleteItem}" />
                    </apribbon:StackPanel>
                </apribbon:Group>
                <apribbon:Group Label="Database"
                        cal:RegionManager.RegionName="{x:Static local:RegionNames.HomeTabModulesGroup}">
<!--
                    <apribbon:SplitButton Label="Factions"
                                          Command="{x:Static local:EditorCommands.ActivateToolWindow}"
                                          CommandParameter="FactionsToolWindow"
                                          ImageSourceLarge="/SupremacyEditor3;component/Resources/United Federation Of Planets.ico">
                        <apribbon:Menu />
                    </apribbon:SplitButton>
                    <apribbon:SplitButton Label="Buildings"
                                          Command="{x:Static local:EditorCommands.ActivateToolWindow}"
                                          CommandParameter="BuildingsToolWindow"
                                          ImageSourceLarge="/SupremacyEditor3;component/Resources/Species 8472.ico">
                        <apribbon:Menu />
                    </apribbon:SplitButton>
                    <apribbon:SplitButton Label="Facilities"
                                          Command="{x:Static local:EditorCommands.ActivateToolWindow}"
                                          CommandParameter="FacilitiesToolWindow"
                                          ImageSourceLarge="/SupremacyEditor3;component/Resources/Farm32.png">
                        <apribbon:Menu />
                    </apribbon:SplitButton>
                    <apribbon:SplitButton Label="Ships"
                                          Command="{x:Static local:EditorCommands.ActivateToolWindow}"
                                          CommandParameter="ShipsToolWindow"
                                          ImageSourceLarge="/SupremacyEditor3;component/Resources/Enterprise, U.S.S. E.ico">
                        <apribbon:Menu />
                    </apribbon:SplitButton>
                    <apribbon:SplitButton Label="Stations"
                                          Command="{x:Static local:EditorCommands.ActivateToolWindow}"
                                          CommandParameter="StationsToolWindow"
                                          ImageSourceLarge="/SupremacyEditor3;component/Resources/Spacedock.ico">
                        <apribbon:Menu />
                    </apribbon:SplitButton>
-->
                </apribbon:Group>
            </apribbon:Tab>
        </apribbon:Ribbon>
        <apdocking:DockSite x:Name="DockSite"
                            Grid.Row="1"
                            cal:RegionManager.RegionName="{x:Static local:RegionNames.DockSite}"
                            CanToolWindowsBecomeDocuments="False"
                            CanToolWindowsDockTop="True"
                            CanToolWindowsDockBottom="True"
                            CanToolWindowsRaft="False"
                            UseHostedRaftingWindows="False"
                            ClosePerContainer="False"
                            AutoHidePerContainer="True">
            <apdocking:Workspace>
                <apdocking:TabbedMdiHost x:Name="TabHost"
                                         CanDocumentsAttach="True"
                                         CanDocumentsDrag="True"
                                         IsCloseButtonOnTab="True">
                    <apdocking:TabbedMdiContainer x:Name="TabContainer"
                                                  cal:RegionManager.RegionName="{x:Static local:RegionNames.Documents}">

                    </apdocking:TabbedMdiContainer>
                </apdocking:TabbedMdiHost>
                <!--<apdocking:StandardMdiHost x:Name="TabHost" cal:RegionManager.RegionName="{x:Static local:RegionNames.Documents}">
          </apdocking:StandardMdiHost>-->
            </apdocking:Workspace>
        </apdocking:DockSite>
    </Grid>
</UserControl>
